// 枚举的定义
// 用来存放一组固定的常量的序列

// 数字枚举
enum WeekEnd {
    Monday = 1,
    Tuesday = 2,
    Wednesday = 3,
    Thursday = 4,
    Friday = 5,
    Saturday = 6,
    Sunday = 7,
}

console.log(WeekEnd.Monday);
console.log(WeekEnd["Monday"]);
console.log(WeekEnd[1]);

// 字符串枚举
enum WeekEnd2 {
    Monday = "myMonday",
    Tuesday = "myTuesday",
    Wednesday = "myWednesday",
    Thursday = "myThursday",
    Friday = "myFriday",
    Saturday = "mySaturday",
    Sunday = "mySunday"
}

console.log(WeekEnd2.Monday);
console.log(WeekEnd2["Monday"]);


